package com.yanqu.road.server.cmd.kowloon;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.kowloon.KowloonProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.kowloon.KowloonModule;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.Protocol;
import org.apache.regexp.RE;

@Cmd(code = Protocol.S_KOWLOON_CANCEL_CHAPTER, desc = "取消、退出关卡")
public class KowloonCancelChapterCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        KowloonProto.KowloonCancelChapterRespMsg.Builder respMsg = player.getModule(KowloonModule.class).cancelGame();
        player.sendPacket(ClientProtocol.U_KOWLOON_CANCEL_CHAPTER, respMsg);

    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
